package com.sud.framework.mybatis.service.impl;

import com.sud.framework.mybatis.dao.BaseDao;
import com.sud.framework.mybatis.service.BaseService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 功能：mybatis通用基础service
 * 作者：SUD
 * 时间：2018/6/26 12:09
 */
@Service
public class BaseServiceImpl implements BaseService {
    @Resource
    BaseDao baseDao;
    @Override
    public <T> T selectObject(String statement, Map<String,Object> parameter) {
        return baseDao.selectObject(statement, parameter);
    }

    @Override
    public <E> List<E> selectObjects(String statement, Map<String,Object> parameter) {
        return baseDao.selectObjects(statement, parameter);
    }

    @Override
    public int insert(String statement, Map<String,Object> parameter) {
        return baseDao.insert(statement, parameter);
    }

    @Override
    public int update(String statement, Map<String,Object> parameter) {
        return baseDao.update(statement, parameter);
    }

    @Override
    public int delete(String statement, Map<String,Object> parameter) {
        return baseDao.delete(statement, parameter);
    }
}
